

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ConnectionHelper {

	private static final Logger logger = LoggerFactory
			.getLogger(ConnectionHelper.class);

	public static Connection getConnection() throws SQLException, ClassNotFoundException {
		// zarejestruj klasę sterownika
		Class.forName("com.mysql.jdbc.Driver");
		
		//Ustaw prawidłowe wartości
		String url = "jdbc:mysql://localhost:3306/joomla01";
		String user = "root";
		String password = "Michal18";
		
		//Pobierz połączenie
		Connection con = DriverManager.getConnection(url, user, password);
		return con;
	}
}
